#ifndef PHYCOLLISIONOBJCALLBACK_H
#define PHYCOLLISIONOBJCALLBACK_H

#include "PHYCollisionObjects.h"
#include "PHYModeler.h"
#include <osg/PositionAttitudeTransform>
#include <iostream>
using namespace std;

class PHYCollisionObjCallback : public osg::NodeCallback
{
public:
	virtual void operator()(osg::Node* node, osg::NodeVisitor* nv)
	{
		PHYModeler *pModeler = PHYModeler::getInstance();
		PHYCollisionObj *pObj = NULL;
		if(pModeler)
		{
			pModeler->BeginSimulation();
			pModeler->UpdateLocations();
		}
		traverse(node, nv); 
	}
};

#endif
